#include "shm.h"
int main(int argc, char const *argv[])
{
	signal(SIGINT,signal_fun);
	create_or_get_shm();
	//建立映射
	shmaddr=shmat(shmid,NULL,0);

	if(shmaddr == (void *) -1) print_err("shmaddr error");
	printf("shmaddr=%d\n",shmaddr );

	while(1){
		if(strlen((char *)shmaddr)!= 0){
			printf("%s\n",(char *)shmaddr);
			bzero(shmaddr,SHM_SIZE);
		}
	}
	return 0;
}

